<!DOCTYPE html>
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <title>postMessage</title>
</head>
<body>
<iframe src="http://a.com/html5/postMessage/i.html"></iframe>
<script type="text/javascript">
    window.addEventListener('message',function(e){
        //console.dir(e.source);
        console.log(e.data);
    },false);
</script>
</body>
</html>  